package com.example.component;

import com.example.FlowContext;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.annotation.LiteflowMethod;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.enums.LiteFlowMethodEnum;

@LiteflowComponent
public class BFFAdapterCmp {

    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "mobileAdapter", nodeName = "移动端适配器")
    public void mobileAdapter(NodeComponent bindCmp) {
        FlowContext contextBean = bindCmp.getContextBean(FlowContext.class);
        // 手机端裁剪信息
        contextBean.getBrand().setDescription(null);
        contextBean.getProduct().setDescription(null);
    }

    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "desktopAdapter", nodeName = "桌面端适配器")
    public void desktopAdapter(NodeComponent bindCmp) {
        FlowContext contextBean = bindCmp.getContextBean(FlowContext.class);
    }
}

